const CracoLessPlugin = require('craco-less');
const path = require("path")//导入path模块
//定义函数resolve,将你想要自定义的路径和js的根路劲作拼接
const resolve = dir =>path.resolve(__dirname,dir)
module.exports = {
  plugins: [
    {
      plugin: CracoLessPlugin,
      options: {
        lessLoaderOptions: {
          lessOptions: {
            javascriptEnabled: true,
          },
        },
      },
    },
  ],
  webpack:{
    alias:{
    //名称:路径
      "@":resolve("src")
    }
  }
};
